import 'package:flutter/material.dart';

class Game extends StatefulWidget {
  final Widget child;
  const Game({Key key, @required this.child})
      :assert(child != null),super(key:key);

  @override
  State<StatefulWidget> createState() {
    return GameController();
  }

  static GameController of(BuildContext context) {
    final state = context.ancestorStateOfType(TypeMatcher<GameController>());
    assert(state != null, "Must Wrap This Context With Game");
    return state;
  }
}

class GameController extends State<Game> with RouteAware {
  @override
  Widget build(BuildContext context) {
    return null;
  }
}

class GameState extends InheritedWidget {
  @override
  bool updateShouldNotify(InheritedWidget oldWidget) {
    return true;
  }
}